package com.fulihui.wgj.facade.service.material;

import com.fulihui.common.error.InvokeServiceException;
import com.fulihui.common.result.rpc.BaseResult;
import com.fulihui.common.result.rpc.SimpleResult;
import com.fulihui.wgj.facade.dto.WxMaterialDTO;
import com.fulihui.wgj.facade.request.material.WxMaterialPageQueryRequest;
import com.fulihui.wgj.facade.request.material.WxMaterialRequest;
import com.fulihui.wgj.facade.request.material.WxMaterialSyncRequest;
import com.fulihui.wgj.facade.result.material.WxMaterialPageResult;

import java.util.List;

/**
 * 微信素材服务
 *
 * @author wang_wx
 * @date 2018-07-11
 */
public interface WxMaterialService {

    /**
     * 同步微信素材
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult syncMaterial(WxMaterialSyncRequest request) throws InvokeServiceException;

    /**
     * 根据类型查询素材
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<List<WxMaterialDTO>> queryWxMaterialByType(WxMaterialSyncRequest request) throws InvokeServiceException;

    /**
     * 根据类型查询素材-分页
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    WxMaterialPageResult pageQueryWxMaterialByType(WxMaterialPageQueryRequest request) throws InvokeServiceException;

    /**
     * 根据主键查询素材
     *
     * @param mediaId
     * @return
     */
    SimpleResult<WxMaterialDTO> queryMaterialById(String mediaId);

    /**
     * 保存微信素材
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult saveWxMaterial(WxMaterialRequest request) throws InvokeServiceException;
}
